package com.rolerealm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rolerealm.domain.entity.UserFavoriteEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserFavoriteMapper extends BaseMapper<UserFavoriteEntity> {

    @Select("select count(1) from user_favorites where user_id = #{userId} and character_id = #{characterId}")
    int existsByUserAndCharacter(Long userId, Long characterId);
}


